home *** CD-ROM | disk | FTP | other *** search
/ Aminet 25 / Aminet 25 (1998)(GTI - Schatztruhe)[!][Jun 1998].iso / Aminet / mus / misc / mp3info.lha / MP3Info.p < prev   
Text File  |  1998-04-19  |  3KB  |  55 lines

  1. ; (c) 1998 Cyborg 
  2.  
  3.     {* Include sys:coder/preass/Options.p *}
  4.     {* Include sys:coder/preass/Prozeduren.p *}
  5.  
  6.     {* String: Version="$VER: Mp3info (C) CYBORG 98"*}
  7.  
  8.     {* IncVar: Type,Art,Chunk,chunklaenge*}
  9.  
  10. Start:
  11.     OH=Output()
  12.     OK=GetFilename()
  13.     If (FH=Open(#Filename,#Mode_old))##0 {
  14.                                           Read(FH,#Chunk,4)
  15.                                           If Chunk##"FORM" ---> .error
  16.                                           Read(FH,#Chunklaenge,4)
  17.                                           Read(FH,#Type,4)
  18.                                           Read(FH,#Art,4)
  19.                                           If Type##"AIFF" or Art##"COMM" --> .error
  20.                                           Read(FH,#Chunklaenge,4)
  21.                                           Seek(FH,Chunklaenge,#Offset_Current)
  22.                                           Read(FH,#Chunk,4)
  23.                                           If Chunk##"SSND" --> .error
  24.                                           Read(FH,#Chunklaenge,4)
  25.                                           MP3laenge==Chunklaenge/11
  26.                                           Frames==mp3laenge/417
  27.                                           Zeit==Mp3laenge/2980
  28.                                           Minuten==Zeit/60
  29.                                           Sekunden==Minuten*60
  30.                                           Sekunden==Zeit-Sekunden
  31.                                           Write(OH,"\nLänge AIFF:   ",?)
  32.                                           Convertzahl(Chunklaenge,OH)
  33.                                           Write(OH," Bytes\nLänge MP3: ca.",?)
  34.                                           Convertzahl(Mp3laenge,OH)
  35.                                           Write(OH," Bytes \nFrames: ",?)
  36.                                           Convertzahl(Frames,OH)
  37.                                           Write(OH,"\nKonvertierdauer: ",?)
  38.                                           Convertzahl(Zeit,OH)
  39.                                           Write(OH," Sekunden\nZeit: ",?)
  40.                                           Convertzahl(Minuten,0)
  41.                                           Write(OH,#zahl,4)
  42.                                           Write(OH," Min. ",?)
  43.                                           Convertzahl(Sekunden,0)
  44.                                           Write(OH,#zahl,4)
  45.                                           Write(OH," Sek.\n\n",?)
  46.                                           Close(FH)
  47.                                          }
  48.     RTS
  49. .error:
  50.     Write(OH,"Kein AIFF oder falscher Typ!\n",?)
  51.     Close(FH)
  52.     RTS
  53.